package io.github.stary1993.kite.admin.config;

import cn.hutool.json.JSONUtil;
import io.github.stary1993.kite.syslog.event.SysLogEventSource;
import io.github.stary1993.kite.syslog.event.SysLogListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CustomSysLogListener extends SysLogListener {

    @Override
    protected void saveLog(SysLogEventSource source) {
        log.info("自定义日志监听器：{}", JSONUtil.toJsonStr(source));
    }
}
